package com.springcloud.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.springcloud.model.SysResource;
import com.springcloud.model.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

/**
 *
 * SysRole 表数据库控制层接口
 *
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

	List<SysRole> selectAll();

	List<Long> selectResourceIdListByRoleId(@Param("id") Long id);

	List<SysResource> selectResourceIdListByRoleIdAndType(@Param("id") Long id);

	List<Map<Long, String>> selectResourceListByRoleId(@Param("id") Long id);

	List<SysRole> selectRoleList(Pagination page, @Param("sort") String sort, @Param("order") String order)throws DataAccessException;

}